1. Field of the Invention
The present invention relates to a control system having a plurality of programmable controllers for performing positioning or speed control.
2. Description of the Related Art
FIG. 8 is a block diagram showing a conventional control system. Control apparatus 507 includes a communication control section 506 which receives an signal transmitted through the transmission path 515 and converts the received signal into a signal to be used by the sequence control section 501. The sequence control section 501 has an internal memory (not shown) having a sequence program stored therein. Under control of this sequence program, the sequence control section 501 periodically monitors the received signal and performs predetermined processing in response to the received signal to perform operations such as, for example, outputting a predetermined output signal. The communication control section 506 also receives control information output by the sequence control section 501, converts that information into a signal transmittable by the transmission path 515, and transmits the signal to the transmission path 515.
A positioning control section 502 is activated by a command from the sequence control section 501. Memory 503 is provided in the positioning control section 502 which stores a positioning program 504. A first motor 505, such as, for example, a servo motor, can be attached to an axis of an apparatus such as, for example, a solenoid valve. The first motor 505 can be driven by the positioning control section 502 as controlled by the positioning program 504. That is, the positioning control section 502 drives the servo motor 505 to perform predetermined positioning control and, for example, adjust the axis of the apparatus to align the apparatus at a predetermined position.
Control apparatus 514 comprises a communication control section 513, which is coupled to the communication control section 506 by transmissions path 515. In a manner similar to the communication control section 506, the communication control section 513 converts a signal transmitted through the transmission path 515 into control information signals, and inputs those signals to the sequence control section 508. The sequence control section 508 also has a memory (not shown) for storing a sequence program. Also, the communication control section 513 converts control information output from the sequence control section 508 into a signal transmittable by the transmission path 515, and transmits that signal to the transmission path 515.
Similar to the operation in the control apparatus 507, a positioning control section 509 is activated by a command from the sequence control section 508. Memory 510 is provided in the positioning control section 509 for storing a positioning program 511. A second motor 512, for example, a servo motor, can be driven by the positioning control section 509 as controlled in accordance with the positioning program 511. That is, the positioning control section 509 drives the servo motor 512 to carry out predetermined positioning control which, for example, controls solenoid valves, relays, etc. (not shown) in a predetermined sequence.
The operation of the conventional control system, as described generally above, will now be described in more detail.
The positioning control of the servo motor 505 is performed by the execution of the positioning program 504 having an instruction step filled with a code identifying the servo motor 505, and indicating a moving method, a positioning target position and a positioning travel speed for that servo motor 505. The positioning target position is hereinafter referred to as the address and the positioning travel speed as the speed.
The memory 510 stores positioning programs, such as positioning program 511, which control driving of the servo motor 512 by the positioning control section 509, to perform positioning control. The positioning program 504 has an instruction step for starting execution of any of the positioning programs stored in memory 510. Hence, the execution of the positioning program 504, having such an instruction step, causes any of the positioning programs stored in memory 510 to be executed to drive servo motor 512 to exercise positioning control.
That is, when the positioning program 504 is run to execute the instruction step for starting execution of the predetermined positioning program stored in the memory 510, predetermined control information is transmitted from the positioning control section 502 to the sequence control section 501. In accordance with this control information, the sequence control section 501 generates control information having a predetermined positioning program number. Note that each of the positioning programs stored in the memory 510 has an assigned positioning program number and thus, a positioning program to be executed is identified by this number.
The control information generated by the sequence control section 501 is transferred from the sequence control section 501 to the communication control section 506 and converted into transmittable data by the communication control section. The converted control information is then transmitted through the transmission path 515, and is received by the communication control section 513. The sequence control section 508 receives the control information from the communication control section 513, and provides this control information to the positioning control section 509. The positioning control section 509 then begins executing the positioning program corresponding to the positioning program number designated by the control information. Accordingly, the movement of the servo motor 512 is controlled in accordance with this positioning program.
Upon completion of the positioning control program, control information indicating this completion is transferred from the positioning control section 509 to the sequence control section 508, and to the communication control section 513. This control information is transmitted via transmission path 515 to the communication control section 506, which provides this control information to the sequence control section 501. The sequence control section 501 in turn provides the control information to the positioning control section 502. In accordance with this control information, the positioning program 504 progresses from the instruction step for starting execution of the positioning program stored in memory 510 (e.g., positioning program 511) which was currently being run to a next instruction step.
The above detailed operation the conventional control system will now be described in accordance with FIGS. 9-16.
FIG. 9 shows the transfer paths of the control information. FIG. 10 shows part of the program list of an example of the positioning program 504 which is stored in the memory 503.
This part of the positioning program 504 includes an instruction step 601 for driving the servo motor 505 to carry out positioning control, and an instruction step 602 for starting execution of a positioning program (e.g., positioning program 511) stored in memory 510 which controls driving of the servo motor 512.
As shown in FIG. 10, instruction step 601 is written as follows:
G01X .hoarfrost. F .hoarfrost. PA1 M50. PA1 G01X .hoarfrost. F .hoarfrost. PA1 M2.
and instruction step 602 is written as follows:
In the instruction step 601, the first three digits represent a code which indicates a moving method. In the example shown in FIG. 10, this code is G01, indicating linear interpolation. The fourth digit represents a code which indicates a servo motor. Code X in this case indicates the servo motor 505. A space subsequent to X is filled with an address. F indicates that a space following F is filled with data representing the speed at which the servo motor is controlled to move.
In instruction step 602, M in the first digit indicates that this instruction is a miscellaneous function instruction. A code written subsequent to M is referred to as the M code which causes a variety of predetermined operations to be performed. In this example, the M code is "50". M code "50" is an instruction for starting the predetermined positioning program which is designed to drive the servo motor 512 to carry out positioning control. As described above, the positioning program for driving the servo motor 512 to exercise positioning control is stored in the memory 510 of the control apparatus 514.
FIG. 11 illustrates a flowchart of the operation of the conventional apparatus. When it is necessary, for example, for the sequence control section 501 to drive the servo motor 505 to exercise positioning control, the sequence control section 501 commands the control section 502 to begin executing the positioning program 504 which is stored in memory 503 as indicated in step S1101. In step S1102, when the positioning control section 502 executes instruction step 601, as shown in FIG. 10, of the positioning program 504, the positioning control section 502 performs feedback control and drives servo motor 505 to position a corresponding axis to a predetermined address at predetermined speed, thereby performing a linear interpolation operation.
In step S1103, the instruction step 602, as shown in FIG. 10, is then executed by the positioning control section 502, which transmits the M code "50" and a synchronization signal, as shown in FIG. 12, to the sequence control section 501 as indicated by control information transfer path "a" in FIG. 9. This synchronization signal is a signal which is output by the positioning control section 502 to the sequence control section 501 to inform the sequence control section 501 of the timing at which the M code output by the positioning control section 502 can be read (hereafter, the synchronization signal shall mean a signal output by a transmission device to a receiving device to inform the receiving device of the timing at which the information output by the transmission device can be read).
Upon reading the M code 801, as in step S1104, the sequence control section 501 determines if the M code is "50" in step S1105. If the M code is not "50", the sequence control section 501 executes other processing as specified by the M code 801. When the M code 801 is 50 as in this case, in step S1106, the sequence control section 501 outputs predetermined control information, as shown in FIG. 13 (the program number 901 and the synchronization signal 902), to the communication control section 506 as indicated by control information transfer path "b" in FIG. 9. The program number 901 is the number assigned to the positioning program stored in the memory 510 of the positioning control section 509 as described previously.
In step S1107, the communication control section 506 converts the control information transmitted by the sequence control section 501 into a signal transmittable in the transmission path 515 and transmits the signal to the communication control section 513 via the transmission path 515 as shown by control information transfer path "c" in FIG. 9. In step S1108, the communication control section 513 receives the signal transmitted from the communication control section 506, converts this received signal into control information transmittable to the sequence control section 508, and outputs the information to the sequence control section 508 as shown by control information data transfer path "d". In accordance with this control information, in step S1109, the sequence control section 508 commands the positioning control section 509 to start the positioning program having the program number 901 stored in the memory 510 of the positioning control section 509 as indicated by control information transfer path "e".
FIG. 14 shows the program list of the positioning program indicated by the program number 901. This positioning program is stored in the memory 510. This program list includes an instruction step 1001 for driving the servo motor 512 to perform positioning control, and an instruction code 1002 indicating the end of program number 901. The instruction step 1001 is written as follows:
and instruction step 1002 is written as follows:
In the instruction step 1001, G01 represents linear interpolation. X here represents the servo motor 512, indicating that the axis is positioned to move to the address indicated by a value corresponding to data in a space subsequent to X at the speed indicated by a value corresponding to data in a space subsequent to F.
As shown in step S1110 of FIG. 15, the positioning control section 509 executes the positioning program of the program number 901, and exercises feedback control on velocity and positioning of the servo motor to drive the servo motor 512 to exercise positioning control. Upon executing the instruction 1002 of program 901, as shown in step S1111, the positioning control section 509 terminates the execution of the selected positioning program. The miscellaneous function instruction of the M code "2" in instruction 1002 is an instruction which terminates the execution of the program.
When the positioning is then complete, in step S1112, a completion signal 1101, as shown in FIG. 16, is transmitted from the positioning control section 509 to the sequence control section 508 as indicated by control information transfer path "f" in FIG. 9. When the completion signal 1101 is sent by the positioning control section 509 to the sequence control section 508, in step S1113, the sequence control section 508 further transmits the completion signal 1101 to the communication control section 513 as indicated by control information transfer path "g".
In step S1114, the communication control section 513 further transmits the completion signal 1101 to the communication control section 506 in the control apparatus 507 via the transmission path 515 as shown by control information transfer path "h". After the completion signal 1101 is received by the communication control section 506, in step S1115, the communication control section 506 further sends the completion signal 1101 to the sequence control section 501 as indicated by control information transfer path "i".
In step S1116, the sequence control section 501 further transmits the completion signal 1101 to the positioning control section 502 as indicated by control information transfer path "j". When the completion signal 1101 is provided to the positioning control section 502 by the sequence control section 501, the positioning control section 502 ends the execution of the instruction step 602 and advances to a next instruction step as indicated by step S1117.
As described above, the servo motor 512 is driven under the command of the positioning control section 502 in the control apparatus 507 to exercise positioning control in accordance with a positioning program stored in memory 510.
In a typical system having axes which are controlled by servo motors, the number of axes in the system is generally equal to the number of servo motors. Often it is necessary to add more control axes in a system. Therefore, additional servo motors and additional control apparatuses for controlling these servo motors are required. When it is necessary to add additional control apparatus for driving additional servo motors to perform further positioning control of the system effected by the additional axes, positioning programs having predetermined program numbers are similarly stored in the memory of each of those additional control apparatus. When the positioning control section 502 executes a positioning program having an instruction for starting-any of the positioning programs, the corresponding servo motor is driven by its corresponding control apparatus to perform positioning control.
In the conventional positioning system configured as described above, a program step for controlling the servo motor 512 must be present in the positioning program 504 of the positioning control section 502 in the control apparatus 507, and is also required to be included in the positioning program 511 of the positioning control section 509 in the control apparatus 514. Therefore, if the positioning of the servo motors 505 and 512 needs to be altered, and a peripheral device (not shown) is used to alter the positioning programs, the peripheral device must be connected to each control apparatus 507 and 514. The peripheral device is used, for example, for debugging, monitoring, etc. of the programs in the control apparatuses.
For example, as shown in the flowchart in FIG. 17, in step S1701, the peripheral device is connected to the control apparatus 507. In step S1702, instruction 601 (see FIG. 10) of the positioning program 504 is corrected by the peripheral device. Then, in step S1703, the peripheral device is connected to control apparatus 514 and positioning program 511 is corrected in step S1704. Hence, at least four steps are required to correct positioning programs in two apparatuses.
Also, since program numbers must be assigned to the positioning programs and positioning is carried out by specifying this program number, the programs are complicated and difficult to understand, requiring much time to write and correct them.